﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using ModelLayer;
using CinemaDbLib;

// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ScheduleCtrl" in code, svc and config file together.
public class ScheduleCtrl : IScheduleCtrl
{
	private ScheduleDB scheduleDB;

	public ScheduleCtrl()
	{
		scheduleDB = new ScheduleDB();
	}

	public Schedule getScheduleById(int id)
	{
		return scheduleDB.getScheduleById(id);
	}

	public Schedule[] getScheduleByMovieId(int id)
	{
		return scheduleDB.getScheduleByMovieId(id).ToArray();
	}

	public Schedule[] getSchedules()
	{
		return scheduleDB.getSchedules().ToArray();
	}
}
